Method of and apparatus for binarizing image signals

ABSTRACT

A multi-valued image signal I(x,y) is compared with a threshold signal TH by a comparator to produce a binary image signal P(x,y), and an error signal E(x,y) is determined from the binary image signal P(x,y) and the multi-valued image signal I(x,y). Error diffusion coefficients W1(k,l), W2(k,l), W3(k,l) are prepared in advance which correspond respectively to the filter characteristics of a &#34;Jarvis-type filter&#34;, an &#34;elongate rectangular filter&#34;, and a &#34;Floyd-type filter&#34;. A mixing ratio setting circuit determines mixing ratios t1(I 0 ), t2(I 0 ), t3(I 0 ) depending on the multi-valued image signal I(x,y). The mixing ratios t1(I 0 ), t2(I 0 ), t3(I 0 ) are accumulated and added to the error diffusion coefficients W1(k,l), W2(k,l), W3(k,l), and an error signal E(x-k,y-l) and an error diffusion coefficient W(k,l,I 0 ) are accumulated and added, producing a diffusion error signal ΔE(x,y). The diffusion error signal ΔE(x,y) is added to the multi-valued image signal I 0  (x,y), producing a corrected multi-valued image signal I(x,y), which is then compared with the threshold signal TH by the comparator to generate a binary image signal P(x,y).

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method of and an apparatus forbinarizing an image signal based on an error diffusion process.

2. Description of the Related Art

For reproducing a gradation image on a display unit or a printer whichis capable of displaying only binary representations, a suppliedgradation image signal which is a multi-valued image signal is convertedinto a binary image signal made up of only 0s and 1s. There is known anerror diffusion process for binarizing a multi-valued image signal.

According to the error diffusion process, when multi-valued image signalrepresenting an input pixel is converted into a binary image signal bycomparison with threshold signal, an error produced by the binarizationis distributed and added to pixels in the vicinity of the input pixel,and a resultant multi-valued image signal is binarized as a newmulti-valued image signal representing the input pixel.

If it is assumed that a multi-valued image signal representing an inputpixel (x,y) is represented by I(x,y) (x indicates the position of theinput pixel in a main scanning direction and y indicates the position ofthe input pixel in an auxiliary scanning direction) and a binary imagesignal converted from the multi-valued image signal is represented byP(x,y), then a binarization error signal E(x,y) is expressed by:

    E(x,y)=I(x,y)-P(x,y).                                      (1)

The binarization error signal E(x,y) determined according to theequation (1) is diffused into nearby pixels around the pixel (x,y) underconsideration, according to equation (2):

    I(x,y)=I.sub.0 (x,y)+αE(x,y),                        (2)

replacing the multi-valued image signal I(x,y) representing the inputpixel. The replaced multi-valued image signal I(x,y) is compared with apredetermined threshold signal, producing a binary image signal P(x,y).In the equation (2), ##EQU1## where W(k,l) represents an error diffusioncoefficient which is used to diffuse the binarization error signalE(x,y) at a certain ratio.

The above error diffusion process for converting multi-valued imagesignals into binary image signals is effective in reproducing continuousgradation signals representing halftone-dot images or photographicimages while suppressing the generation of moire patterns.

However, the error diffusion process is disadvantageous in that itallows a striped pattern peculiar to a binarized image or an undesirabletexture (fine pattern) in a range of certain density levels to begenerated depending on the manner in which the error diffusioncoefficient W(k,l) is established. Furthermore, a dot pattern havingdifferent densities in main and auxiliary scanning directions may beproduced, thereby giving rise to some periodical image patterns.

For example, if a "Floyd-type filter" is used (see FIG. 4A of theaccompanying drawings where * represents a pixel under consideration)for establishing error diffusion coefficients W(k-l,l-1), W(k,l-1),W(k+1,l-1), W(k-1,l) respectively with respect to multi-valued imagesignals I(x-1,y-1), I(x,y-1), I(x+1,y-1), I(x-1,y) that are locatedwithin two pixels from a multi-valued image signal I(x,y) of a pixelunder consideration, then a dot pattern is produced which is dense in amain scanning direction and coarse in an auxiliary scanning direction inhighlight and shadow ranges of a binarized halftone dot image, makingthe image form with noticeable regular patterns, and a distinctstaggered texture appears in intermediate-density ranges.

If an "elongate rectangular filter" is used (see FIG. 4B of theaccompanying drawings) for establishing an error diffusion coefficientW(k,l) with respect to a multi-valued image signal I(x,y) that islocated within four pixels in a main scanning direction and two pixelsin an auxiliary scanning direction from a multi-valued image signalI(x,y) of a pixel under consideration, then a texture which is long inthe main scanning direction is generated in intermediate-density rangesof a binarized halftone dot image, and a dot pattern is produced whichis dense in the main scanning direction and coarse in the auxiliaryscanning direction in ranges of the binarized halftone dot image exceptfor highlight ranges, intermediate-density ranges, and shadow ranges.

If a "Jarvis-type filter" is used (see FIG. 4C of the accompanyingdrawings) for establishing an error diffusion coefficient W(k,l) withrespect to a multi-valued image signal I(x,y) that is located withinthree pixels from a multi-valued image signal I(x,y) of a pixel underconsideration, then a dot pattern is produced which is dense in a mainscanning direction and coarse in an auxiliary scanning direction inhighlight and shadow ranges of a binarized halftone dot image, and apeculiar striped pattern is generated in ranges of the binarizedhalftone dot image except for highlight ranges, intermediate-densityranges, and shadow ranges.

SUMMARY OF THE INVENTION

It is therefore an object of the present invention to provide a methodof and an apparatus for binarizing an image signal based on an errordiffusion process to produce an image which is free of undesirabletextures and periodic image patterns.

The above object can be achieved in accordance with the presentinvention by an apparatus for producing a binary image signal,comprising comparing means for comparing a multi-valued image signalwith a predetermined threshold signal thereby to produce a binary imagesignal, error signal calculating means for determining an error signalbased on the difference between the multi-valued image signal and thebinary image signal, error diffusion coefficient setting means forestablishing an error diffusion coefficient to diffuse the error signalinto multi-valued image signals around the multi-valued image signal,depending on the multi-valued image signal, and means for correcting themulti-valued image signal with the error signal which has been weightedby the error diffusion coefficient.

The above object can also be accomplished by a method of producing abinary image signal, comprising the steps of comparing a multi-valuedimage signal with a predetermined threshold signal thereby to produce abinary image signal, determining an error signal based on the differencebetween the multi-valued image signal and the binary image signal,establishing an error diffusion coefficient to diffuse the error signalinto multi-valued image signals around the multi-valued image signal,depending on the multi-valued image signal, diffusing the error signalwith the error diffusion coefficient, and correcting the multi-valuedimage signal with the error signal which has been weighted by the errordiffusion coefficient.

With the above apparatus and method according to the present invention,a multi-valued signal is compared with a threshold signal to produce abinary image signal, and corrected using an error signal whichrepresents the difference between the binary image signal and themulti-valued image signal. At this time, the error signal is diffusedinto surrounding pixels using an error diffusion coefficient that hasbeen established depending on the multi-valued image signal, and appliedto the multi-valued image signal, for thereby generating a good binaryimage signal which is free from the generation of textures and periodicimage patterns.

The above and other objects, features, and advantages of the presentinvention will become apparent from the following description when takenin conjunction with the accompanying drawings which illustrate preferredembodiments of the present invention by way of example.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an error diffusing circuit whichincorporates an apparatus for binarizing an image signal according tothe present invention;

FIGS. 2A, 2B and 2C are diagrams illustrative of mixing ratios that areestablished in a mixing ratio setting circuit in the error diffusingcircuit shown in FIG. 1;

FIG. 3 is a block diagram of an error diffusing circuit according toanother embodiment which incorporates an apparatus for binarizing animage signal according to the present invention;

FIG. 4A is a diagram illustrative of a "Floyd-type filter";

FIG. 4B is a diagram illustrative of an "elongate rectangular filter";and

FIG. 4C is a diagram illustrative of a "Jarvis-type filter".

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Like or corresponding reference numerals denote like or correspondingparts throughout the views.

FIG. 1 shows in block form an error diffusing circuit 10 whichincorporates an apparatus for binarizing an image signal according tothe present invention.

As shown in FIG. 1, the error diffusing circuit 10 generally comprises amulti-valued image memory 12 for storing a multi-valued image signalI(x,y), a comparator 14 (comparing means) for comparing the multi-valuedimage signal I(x,y) with a predetermined threshold signal TH to producea binary image signal P(x,y), an error memory 16 for storing thedifference between the multi-valued image signal I(x,y) and the binaryimage signal P(x,y) as an error signal E(x,y), an error diffusioncoefficient memory 18 for storing a plurality of error diffusioncoefficients W1(k,l), W2(k,l), . . . of different diffusion degrees, anda mixing ratio setting circuit 20 for setting mixing ratios for theerror diffusion coefficients W1(k,l), W2(k,l), . . . respectively tot1(I₀), t2(I₀), . . . (t1(I₀)+t2(I₀)+. . .=1) depending on themulti-valued image signal I(x,y). In FIG. 1, "x" represents the positionof an image (pixel) in a main scanning direction, "y" represents theposition of an image (pixel) in an auxiliary scanning direction, "k" and"l" represent a range of pixels positioned around a pixel that isspecified by (x,y).

The error signal E(x,y) is determined as the difference between themulti-valued image signal I(x,y) and the binary image signal P(x,y) by asubtractor 24 (error signal calculating means). The mixing ratiost1(I₀), t2(I₀), . . . and the error diffusion coefficients W1(k,l),W2(k,l), . . . are accumulated and added into an error diffusioncoefficient W(k,l,I₀) by an accumulating adder 25. An error signalE(x-k,y-l) from the error memory 16 and the error diffusion coefficientW(k,l,I₀) from the accumulating adder 25 are accumulated and added by anaccumulating adder 26, which supplies a sum signal to an adder 28. Theerror diffusion coefficient W(k,l,I₀) is represented by:

    W(k,l,I.sub.0)=t1(I.sub.0)·W1(k,l)=t2(I.sub.0)·W2(k,l)+. . . .                                                     (4)

Operation of the error diffusing circuit 10 will be described below.

A multi-valued image signal I(x,y) is stored in the multi-valued imagememory 12 and then supplied through the adder 28 to the comparator 14.The comparator 14 compares the multi-valued image signal I(x,y) with apredetermined threshold signal TH to produce a binary image signalP(x,y). The relationship between the multi-valued image signal I(x,y)and the binary image signal P(x,y) is expressed as follows:

    P(x,y)=0 (I(x,y)<TH) 1 (I(x,y)≧TH).                 (5)

The binary image signal P(x,y) outputted from the comparator 14 issupplied to the subtractor 24, which determines an error signal E(x,y)represented by:

    E(x,y)=I(x,y)-P(x,y).                                      (6)

The error signal E(x,y) is stored in the error memory 16. In thecalculation of the equation (6), if the multi-valued image signal I(x,y)is of 8-bit data, then the binary image signal P(x,y) is converted into8-bit data according to the following equation (5):

    P(x,y)=0 (I(x,y)<TH) 255 (I(x,y)≧TH).               (5)'

The mixing-ratio setting circuit 20 establishes mixing ratios t1(I₀),t2(I₀), . . . depending on the multi-valued image signal I₀ (x,y), andsupplies the established mixing ratios t1(I₀), t2(I₀), . . . to theaccumulating adder 25. The error diffusion coefficient memory 18supplies the stored error diffusion coefficients W1(k,l), W2(k,l), . . .to the accumulating adder 25. As a result, the accumulating adder 25produces the error diffusion coefficient W(k,l,I₀) represented by theequation (4) above.

The error diffusion coefficient W(k,l,I₀) and the error signalE(x-k,y-l) are accumulated and added by the accumulating adder 26, whichproduces, as a sum signal, a diffusion error signal ΔE(x,y) representedby the following equation (7): ##EQU2## where I₀ indicates amulti-valued image signal from the pixel (x,y).

The diffusion error signal ΔE(x,y) is then added to the multi-valuedimage signal I₀ (x,y) by the adder 28, which produces, as a sum signal,a corrected multi-valued image signal I(x,y) represented by thefollowing equation (8):

    I(x,y)=I.sub.0 (x,y)+ΔE(x,y).                        (8)

The corrected multi-valued image signal I(x,y) is compared with thethreshold signal TH by the comparator 14, which outputs a binary imagesignal P(x,y).

The error diffusion coefficient W(k,l,I₀) is established, for example,as:

    W(k,l,I.sub.0)=t1(I.sub.0)·W1(k,l)+t2(I.sub.0)·W2(k,l)+t3(I.sub.0)·W3(k,l) . . . .                         (4)'

With respect to the error diffusion coefficient W1(k,l), the "Floyd-typefilter" (see FIG. 4A) is employed which establishes the error diffusioncoefficient W1(k,l) with respect to multi-valued image signals that arelocated within two pixels from a multi-valued image signal I(x,y) of apixel under consideration. With respect to the error diffusioncoefficient W2(k,l), the "elongate rectangular filter" (see FIG. 4B) isemployed which establishes the error diffusion coefficient W2(k,l) withrespect to a multi-valued image signal I(x,y) that is located withinfour pixels in the main scanning direction and two pixels in theauxiliary scanning direction from a multi-valued image signal I(x,y) ofa pixel under consideration. With respect to the error diffusioncoefficient W3(k,l), the "Jarvis-type filter" (see FIG. 4C) is employedwhich establishes the error diffusion coefficient W3(k,l) with respectto multi-valued image signals that are located within three pixels froma multi-valued image signal I(x,y) of a pixel under consideration. Themixing ratios t1(I₀), t2(I₀), t3(I₀) are set, as shown in FIGS. 2A, 2B,and 2C, such that t1(I₀)=t3(I₀)=0 and t2(I₀)=1 if the density of themulti-valued image signal I₀ (x,y) is in highlight and shadow ranges,t1(I₀)=t2(I₀)=0 and t3(I₀)=1 if the density of the multi-valued imagesignal I₀ (x,y) is in an intermediate range, and t1(I₀)=1,t2(I₀)=t3(I₀)=0 if the density of the multi-valued image signal I₀ (x,y)is otherwise.

With the error diffusion coefficients W1(k,l), W2(k,l), W3(k,l) and themixing ratios t1(I₀), t2(I₀), t3(I₀) being thus established, the"Jarvis-type filter" functions for the intermediate-density range of themulti-valued image signal I(x,y) to suppress the generation of textures,the "elongate rectangular filter" functions for the highlight and shadowranges of the multi-valued image signal I(x,y) to lower the visibilityof periodic image patterns in the main and auxiliary scanningdirections, and the "Floyd-type filter" functions for other densityranges, thereby generating a good binary image signal P(x,y).Consequently, drawbacks of the above filters are compensated fordepending on the density of the multi-valued image signal I(x,y), makingit possible to produce a good binary image signal P(x,y) which is freefrom characteristic textures in all density ranges, has dot patternsthat are coarse and dense isotropically, and suffers less periodicalimage patterns.

FIG. 3 shows in block form an error diffusing circuit according toanother embodiment which incorporates an apparatus for binarizing animage signal according to the present invention. As shown in FIG. 3, theerror diffusing circuit, generally denoted as 30, comprises amulti-valued image memory 12, a comparator 14, an error memory 16, asubtractor 24, an accumulating adder 26, and an adder 28, which areidentical to those shown in FIG. 1. The error diffusing circuit 30 alsohas an error diffusion coefficient setting circuit 32 for calculating anerror diffusion coefficient W(k,l,I₀) based on a multi-valued imagesignal I(x,y), and an error diffusion coefficient memory 34 for storingthe error diffusion coefficient W(k,l,I₀) calculated by the errordiffusion coefficient setting circuit 32. An error signal E(x-k,y-l)from the error memory 16 and the error diffusion coefficient W(k,l,I₀)from the error diffusion coefficient memory 34 are accumulated and addedby the accumulating adder 26, which produces, as a sum signal, adiffusion error signal ΔE(x,y) represented by the above equation (7).The diffusion error signal ΔE(x,y) is added to the multi-valued imagesignal I₀ (x,y) by the adder 28, which produces, as a sum signal, acorrected multi-valued image signal I(x,y).

The error diffusion coefficient W(k,l,I₀) may be established accordingto the above equation (4), using the mixing ratios t1(I₀), t2(I₀), . . .and the error diffusion coefficients W1(k,l), W2(k,l), . . . shown inFIGS. 2A through 2C. The error diffusing circuit 30 according to theembodiment shown in FIG. 3 can also produce a good binary image signalP(x,y) in the same manner as the error diffusing circuit 10 according tothe embodiment shown in FIG. 1.

The error diffusing process which has been described as being carriedout by the error diffusing circuits 10, 30 may be software-implementedby a computer.

Although certain preferred embodiments of the present invention has beenshown and described in detail, it should be understood that variouschanges and modifications may be made therein without departing from thescope of the appended claims.

What is claimed is:
 1. An apparatus for producing a binary image signalcomprising:a comparing means for comparing a multi-valued image signalof a target pixel with a threshold signal to produce a binary imagesignal; an error signal calculating means for determining an errorsignal based on a difference between said multi-valued image signal andsaid binary image signal; an error diffusion coefficient setting meansfor establishing error diffusion coefficients to diffuse said errorsignal to multi-valued image signals corresponding to pixels in thevicinity of said target pixel, wherein the error diffusion coefficientsare established depending on a density value of said multi-valued imagesignal of said target pixel; and a means for correcting saidmulti-valued image signal of said target pixel with error signals whichhave been weighted with a set of error diffusion coefficients, whereinsaid error diffusion coefficient setting means comprises means forcombining characteristics of a "Jarvis-type filter", an "elongaterectangular filter", and a "Floyd-type filter" depending on a densityvalue of said multi-valued image signal of said target pixel toestablish error diffusion coefficients.
 2. An apparatus according toclaim 1, wherein said error diffusion coefficient setting meanscomprises means for enabling the "elongate rectangular filter" if adensity value of said multi-valued image signal for said target pixel isin highlight and shadow ranges, enabling the "Jarvis-type filter" if adensity value of said multi-valued image signal for said target pixel isin an intermediate-density range, and enabling at least one of a"Floyd-type filter," an "elongate rectangular filter," and a"Jarvis-type filter" if a density value of said multi-valued imagesignal for said target pixel is in another density range.